Forwarding entry monitoring method and apparatus

ABSTRACT

This application discloses a forwarding entry monitoring method and apparatus, to quickly determine a changed forwarding entry, thereby improving locating efficiency. The method includes: determining, by a first node, a monitored data stream; determining, by the first node, that a stored forwarding entry changes, where the forwarding entry is used to forward the data stream; and sending, by the first node, a first packet to a second node. The second node is located on a transmission path of the data stream, and the second node is a previous-hop node of the first node. The first packet carries a change instruction.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2019/085869, filed on May 7, 2019, which claims priority toChinese Patent Application No. 201810496408.0, filed on May 22, 2018.The disclosures of the aforementioned applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

This application relates to the field of communications technologies,and in particular, to a forwarding entry monitoring method andapparatus.

BACKGROUND

In an autonomic network, a data packet is forwarded through a forwardingentry stored on each node device on a transmission path. The forwardingentry may be a routing table, an ARP/ND table, or the like.

For example, the forwarding entry is a routing table, and a forwardingprocess of the data packet is as follows:

After receiving a data packet, a node device A first determines adestination IP address of the data packet, and then searches a routingtable stored on the node device A, to determine whether the routingtable stored on the node device A includes the destination IP address ofthe data packet. In the routing table of the node device A, each IPaddress corresponds to a port number. If the routing table stored on thenode device A includes the destination IP address of the data packet,the node device A sends the data packet to a port corresponding to thedestination IP address. In this way, the data packet is sent to anext-hop node device. The next-hop node device forwards the data packetin a same processing manner as the node device A, until the data packetis sent to a device corresponding to the destination IP address, tocomplete forwarding of the data packet.

It can be learned that correct execution of a data packet forwardingprocess depends on a correct forwarding entry. Therefore, once theforwarding entry changes, a service may be interrupted.

In the prior art, when the service is interrupted due to a change of theforwarding entry, an administrator needs to perform operations such asping segmentation or trace route for a plurality of times, to checkconnectivity of a transmission path and determine a faulty node deviceor link. Then, a plurality of forwarding entries on the faulty nodedevice are manually checked, to determine a changed forwarding entry.The operations are complex, and locating efficiency is low.

SUMMARY

Embodiments of this application provide a forwarding entry monitoringmethod and apparatus, to quickly determine a changed forwarding entry ona transmission path of a data stream, thereby improving fault locatingefficiency.

According to a first aspect, an embodiment of this application providesa forwarding entry monitoring method. The method includes: firstdetermining, by a first node, a to-be-monitored data stream; and thensending, after determining that a stored forwarding entry used toforward the data stream changes, a first packet to a second node locatedon a transmission path of the data stream. The second node is aprevious-hop node of the first node. The first packet carries a changeindication.

According to the foregoing technical solution, after the forwardingentry, corresponding to the to-be-monitored data stream, that is storedon the first node changes, the first node feeds back a change status tothe previous-hop node on the transmission path of the data stream.Therefore, after the transmission path is faulty due to a change of theforwarding entry, the forwarding entry and the node that cause a faulton the transmission path of the data stream may be quickly determinedbased on the change status of the forwarding entry. This may improvefault locating efficiency.

With reference to the first aspect, in an embodiment, the changeindication is used to indicate that the forwarding entry changes, or thechange indication is used to indicate changed content in the forwardingentry.

According to the foregoing technical solution, the first node mayindicate a change of the forwarding entry in a plurality of manners, toimprove system flexibility.

In an embodiment, the first packet further carries a node identifier ofthe first node and a node identifier of the second node.

According to the foregoing technical solution, the first node may reporta path relationship related to the first node to the second node throughthe first packet.

In an embodiment, the first node sends the first packet to the secondnode through a first channel different from the transmission path of thedata stream.

According to the foregoing technical solution, a channel for sending thefirst packet is different from a channel of the transmission path of thedata stream. In this case, even if the transmission path of the datastream is faulty, the first packet can be successfully transmitted tothe second node. This can ensure normal transmission of the firstpacket.

In an embodiment, the first node receives a second packet from thesecond node through the transmission path of the data stream, where thesecond packet is used to obtain status information of the forwardingentry, and the status information is used to indicate whether theforwarding entry changes; and the first node determines the data streambased on a parameter carried in the second packet.

According to the foregoing technical solution, the first node maydetermine a monitored data stream from the plurality of data streamsbased on the second packet sent by the second node, to reduce load ofthe first node.

In an embodiment, the parameter carried in the second packet includes anidentifier of the transmission path of the to-be-monitored data stream.

According to the foregoing technical solution, the first node maydetermine the to-be-monitored data stream based on the identifier, ofthe transmission path of the to-be-monitored data stream, that iscarried in the second packet.

In an embodiment, after the first node sends the first packet to thesecond node, the first node sends the second packet to a third nodethrough the transmission path of the data stream. The third node is anext-hop node of the first node on the transmission path of the datastream.

According to the foregoing technical solution, the first node mayfurther send the second packet to the next-hop node of the first node.In this way, after the next-hop node receives the second packet, when aforwarding entry, corresponding to the data stream, that is stored onthe next-hop node changes, the next-hop node also sends a change statusof the forwarding entry to the second node. In this way, the second nodemay receive change statuses of forwarding entries of all nodes on thetransmission path.

In an embodiment, the first node, the second node, and the third nodeare nodes located in an autonomic networking integrated model andapproach (ANIMA) domain.

According to a second aspect, an embodiment of this application providesa forwarding entry monitoring method. The method includes: firstreceiving, by a second node, a first instruction, where the firstinstruction instructs the second node to monitor whether a forwardingentry that is on a transmission path of a data stream and that is usedto forward the data stream changes, and the first instruction carries anidentifier of the transmission path of the data stream; thendetermining, by the second node, a first node based on a forwardingentry stored on the second node, where the first node is a next-hop nodeof the second node on the transmission path; and after the first node isdetermined, sending, by the second node to the first node, a secondpacket used to obtain status information of a first forwarding entrystored on the first node. The status information is used to indicatewhether the forwarding entry changes, and the first forwarding entry isused by the first node to forward the data stream.

According to the foregoing technical solution, the second node maydetermine, based on the first instruction, the to-be-monitored datastream, and then send, to the next-hop node of the second node on thetransmission path of the data stream, the second packet used to obtain achange status of the forwarding entry on the next-hop node. In this way,after the forwarding entry on the next-hop node changes, the second nodemay obtain the change status. Therefore, after the transmission path isfaulty due to a change of the forwarding entry, the second node mayquickly determine, based on an obtained change status of the forwardingentry, the forwarding entry and the node that cause a fault. This mayimprove locating efficiency.

In an embodiment, the second node receives a first packet generated bythe first node and/or a third packet generated by a third node. Thefirst packet carries a first change indication, and the first changeindication is used to indicate that the first forwarding entry changes.The third packet is used to carry a second change indication, and thesecond change indication is used to indicate that a second forwardingentry stored on the third node changes. The second forwarding entry isused by the third node to forward the data stream. The third node is anext-hop node of the first node on the transmission path.

According to the foregoing technical solution, after the forwardingentry that is stored on the first node and that corresponds to themonitored data stream changes and/or the forwarding entry that is storedon the third node and that corresponds to the monitored data streamchanges, the second node obtains the change status from the first nodeand/or the third node, to obtain change statuses of forwarding entrieson a plurality of nodes of the transmission path. This may improvelocating accuracy.

In an embodiment, the second node determines, based on the first packetand/or the third packet, a transmission path used to forward the datastream. The first packet further carries a node identifier of the secondnode and a node identifier of the first node. The third packet furthercarries the node identifier of the first node and a node identifier ofthe third node.

According to the foregoing technical solution, after obtaining the firstpacket sent by the first node and/or the third packet sent by the thirdnode, the second node may find the transmission path of the data streambased on the node identifier carried in the first packet and/or thethird packet.

In an embodiment, the second node determines, based on the first changeindication, that the first forwarding entry changes, and determines thatthe first node is a faulty node on the transmission path; and/or, thesecond node determines, based on the second change indication, that thesecond forwarding entry changes, and determines that the third node is afaulty node on the transmission path.

According to the foregoing technical solution, when the second nodeobtains the first packet from the first node and/or the third packetfrom the third node, and the transmission path is faulty due to thechange of the forwarding entry, the second node may determine that thefirst node and/or the third node are/is faulty node(s) on thetransmission path. This may improve efficiency of locating the faultynode.

In an embodiment, the second node determines, based on the first changeindication, that a change of the first forwarding entry meets a presetcondition, and outputs, based on the first packet, prompt informationused to remind the change; and/or, the second node determines, based onthe second change indication, that a change of the second forwardingentry meets a preset condition, and outputs, based on the third packet,prompt information used to remind the change. The preset conditionincludes a condition under which transmission of the data stream isinterrupted.

According to the foregoing technical solution, the second node maygenerate corresponding prompt information in advance based on a changestatus of a forwarding entry of a node on the transmission path of thedata stream, so that an administrator may perform correspondingprocessing based on the prompt information, for example, repairing acorresponding node in time. This may improve reliability of data streamtransmission.

According to a third aspect, an embodiment of this application providesa forwarding entry monitoring apparatus. The apparatus may be a firstnode, or may be an apparatus on the first node. The apparatus mayinclude a processing unit, a storage unit, and a sending unit. Theseunits may perform a corresponding function performed by the first nodein any design example of the first aspect. Details are as follows:

the processing unit is configured to determine a to-be-monitored datastream, and determine that a forwarding entry stored in the storage unitchanges, where the forwarding entry is used to forward the data stream;and

the sending unit is configured to send a first packet to a second node,where the second node is located on a transmission path of the datastream, the second node is a previous-hop node of the first node, andthe first packet carries a change indication.

In an embodiment, the change indication is used to indicate that theforwarding entry changes, or the change indication is used to indicatechanged content in the forwarding entry.

In an embodiment, the first packet further carries a node identifier ofthe apparatus and a node identifier of the second node.

In an embodiment, the sending unit is specifically configured to sendthe first packet to the second node through a first channel. The firstchannel is different from the transmission path of the data stream.

In an embodiment, the apparatus further includes a receiving unit,configured to receive a second packet from the second node through thetransmission path of the data stream, where the second packet is used toobtain status information of the forwarding entry, and the statusinformation is used to indicate whether the forwarding entry changes;and

the processing unit is specifically configured to determine the datastream based on a parameter carried in the second packet.

In an embodiment, the parameter carried in the second packet includes anidentifier of the transmission path of the to-be-monitored data stream.

In an embodiment, the sending unit is further configured to:

send the second packet to a third node, where the third node is anext-hop node of the apparatus on the transmission path of the datastream.

In an embodiment, the apparatus, the second node, and the third node arenodes located in an autonomic networking integrated model and approach(ANIMA) domain.

According to a fourth aspect, an embodiment of this application providesa forwarding entry monitoring apparatus. The apparatus may be a secondnode, or may be an apparatus on the second node. The apparatus mayinclude a processing unit, a storage unit, a sending unit, and areceiving unit. These units may perform a corresponding functionperformed by the second node in any design example of the second aspect.Details are as follows:

the receiving unit is configured to receive a first instruction, wherethe first instruction instructs the apparatus to monitor whether aforwarding entry on a transmission path of a data stream changes, theforwarding entry is used to forward the data stream, and the firstinstruction carries an identifier of the transmission path of the datastream;

the processing unit is configured to determine a first node based on aforwarding entry stored on the storage unit, where the first node is anext-hop node of the apparatus on the transmission path; and

the sending unit is configured to send a second packet to the firstnode, where the second packet is used to obtain status information of afirst forwarding entry stored on the first node, the status informationis used to indicate whether the forwarding entry changes, and the firstforwarding entry is used by the first node to forward the data stream.

In an embodiment, the receiving unit is further configured to:

receive a first packet generated by the first node and/or a third packetgenerated by a third node, where the first packet carries a first changeindication, the first change indication is used to indicate that thefirst forwarding entry changes, the third packet is used to carry asecond change indication, the second change indication is used toindicate that a second forwarding entry stored on the third nodechanges, the second forwarding entry is used by the third node toforward the data stream, and the third node is a next-hop node of thefirst node on the transmission path.

In an embodiment, the processing unit is further configured to:

determine, based on the first packet and/or the third packet, atransmission path used to forward the data stream, where the firstpacket further carries a node identifier of the apparatus and a nodeidentifier of the first node, and the third packet further carries thenode identifier of the first node and a node identifier of the thirdnode.

In an embodiment, the processing unit is further configured to:

determine, based on the first change indication, that a change of thefirst forwarding entry meets a preset condition, and output, based onthe first packet, prompt information used to remind the change, wherethe preset condition includes a condition under which transmission ofthe data stream is interrupted; and/or

determine, based on the second change indication, that a change of thesecond forwarding entry meets a preset condition, and output, based onthe third packet, prompt information used to remind the change, wherethe preset condition includes the condition under which transmission ofthe data stream is interrupted.

In an embodiment, the processing unit is further configured to:

determine, based on the first change indication, that the firstforwarding entry changes, and determine that the first node is a faultynode on the transmission path; and/or

determine, based on the second change indication, that the secondforwarding entry changes, and determine that the third node is a faultynode on the transmission path.

According to a fifth aspect, an embodiment of this application furtherprovides an apparatus. The apparatus includes a processor, configured toimplement the methods described in the first aspect. The apparatus mayfurther include a memory, configured to store a program instruction anddata. The memory is coupled to the processor. The processor may invokeand execute the program instruction stored in the memory, to implementany one of the methods described in the first aspect. The apparatus mayfurther include a communications interface. The communications interfaceis used by the apparatus to communicate with another device. Forexample, the another device is a second node.

In an embodiment, the apparatus includes:

the memory, configured to store a program instruction and a forwardingentry;

the processor, configured to determine a to-be-monitored data stream,and determine that the forwarding entry stored in the memory changes,where the forwarding entry is used to forward the data stream; and

the communications interface, configured to send a first packet to thesecond node, where the second node is located on a transmission path ofthe data stream, the second node is a previous-hop node of theapparatus, and the first packet carries a change indication.

In an embodiment, the change indication is used to indicate that theforwarding entry changes, or the change indication is used to indicatechanged content in the forwarding entry.

In an embodiment, the first packet further carries a node identifier ofthe apparatus and a node identifier of the second node.

In an embodiment, the communications interface is specificallyconfigured to send the first packet to the second node through a firstchannel. The first channel is different from the transmission path ofthe data stream.

In an embodiment, the communications interface is further configured toreceive a second packet from the second node through the transmissionpath of the data stream, where the second packet is used to obtainstatus information of the forwarding entry, and the status informationis used to indicate whether the forwarding entry changes; and

the processor is specifically configured to determine the data streambased on a parameter carried in the second packet.

In an embodiment, the parameter carried in the second packet includes anidentifier of the transmission path of the to-be-monitored data stream.

In an embodiment, the communications interface is further configured to:

send the second packet to a third node, where the third node is anext-hop node of the apparatus on the transmission path of the datastream.

In an embodiment, the apparatus, the second node, and the third node arenodes located in an autonomic networking integrated model and approach(ANIMA) domain.

According to a sixth aspect, an embodiment of this application furtherprovides an apparatus. The apparatus includes a processor, configured toimplement the methods described in the second aspect. The apparatus mayfurther include a memory, configured to store a program instruction anddata. The memory is coupled to the processor. The processor may invokeand execute the program instruction stored in the memory, to implementany one of the methods described in the second aspect. The apparatus mayfurther include a communications interface. The communications interfaceis used by the apparatus to communicate with another device. Forexample, the another device is a first node.

In an embodiment, the apparatus includes:

the memory, configured to store a program instruction and a forwardingentry;

the communications interface, configured to receive a first instruction,where the first instruction instructs the apparatus to monitor whether aforwarding entry on a transmission path of a data stream changes, theforwarding entry is used to forward the data stream, and the firstinstruction carries an identifier of the transmission path of the datastream; and

the processor, configured to determine the first node based on theforwarding entry stored in the memory, where the first node is anext-hop node of the apparatus on the transmission path.

The communications interface is further configured to send a secondpacket to the first node. The second packet is used to obtain statusinformation of a first forwarding entry stored on the first node. Thestatus information is used to indicate whether the forwarding entrychanges. The first forwarding entry is used by the first node to forwardthe data stream.

In an embodiment, the communications interface is further configured to:

receive a first packet generated by the first node and/or a third packetgenerated by a third node, where the first packet carries a first changeindication, the first change indication is used to indicate that thefirst forwarding entry changes, the third packet is used to carry asecond change indication, the second change indication is used toindicate that a second forwarding entry stored on the third nodechanges, the second forwarding entry is used by the third node toforward the data stream, and the third node is a next-hop node of thefirst node on the transmission path.

In an embodiment, the processor is further configured to:

determine, based on the first packet and/or the third packet, atransmission path used to forward the data stream, where the firstpacket further carries a node identifier of the apparatus and a nodeidentifier of the first node, and the third packet further carries thenode identifier of the first node and a node identifier of the thirdnode.

In an embodiment, the processor is further configured to:

determine, based on the first change indication, that a change of thefirst forwarding entry meets a preset condition, and output, based onthe first packet, prompt information used to remind the change, wherethe preset condition includes a condition under which transmission ofthe data stream is interrupted; and/or

determine, based on the second change indication, that a change of thesecond forwarding entry meets a preset condition, and output, based onthe third packet, prompt information used to remind the change, wherethe preset condition includes the condition under which transmission ofthe data stream is interrupted.

In an embodiment, the processor is further configured to:

determine, based on the first change indication, that the firstforwarding entry changes, and determine that the first node is a faultynode on the transmission path; and/or

determine, based on the second change indication, that the secondforwarding entry changes, and determine that the third node is a faultynode on the transmission path.

According to a seventh aspect, an embodiment of this application furtherprovides a computer-readable storage medium. The computer-readablestorage medium stores a computer program. The computer program includesa program instruction. When the program instruction is executed by acomputer, the computer is enabled to perform the method according to thefirst aspect.

According to an eighth aspect, an embodiment of this application furtherprovides a computer-readable storage medium. The computer-readablestorage medium stores a computer program. The computer program includesa program instruction. When the program instruction is executed by acomputer, the computer is enabled to perform the method according to thesecond aspect.

According to a ninth aspect, an embodiment of this application furtherprovides a computer program product. The computer program product storesa computer program. The computer program includes a program instruction.When the program instruction is executed by a computer, the computer isenabled to perform the method according to the first aspect.

According to a tenth aspect, an embodiment of this application furtherprovides a computer program product. The computer program product storesa computer program. The computer program includes a program instruction.When the program instruction is executed by a computer, the computer isenabled to perform the method according to the second aspect.

According to an eleventh aspect, an embodiment of this applicationprovides a chip system. The chip system includes a processor, mayfurther include a memory, and is configured to63 implement the methodaccording to the first aspect. The chip system may include a chip, ormay include a chip and another discrete component.

According to a twelfth aspect, an embodiment of this applicationprovides a chip system. The chip system includes a processor, mayfurther include a memory, and is configured to implement the methodaccording to the second aspect. The chip system may include a chip, ormay include a chip and another discrete component.

According to a thirteenth aspect, an embodiment of this applicationprovides a system. The system includes the apparatus according to thethird aspect and the apparatus according to the fourth aspect.

According to a fourteenth aspect, an embodiment of this applicationprovides a system. The system includes the apparatus according to thefifth aspect and the apparatus according to the sixth aspect.

For beneficial effects of the third aspect to the fourteenth aspect andthe embodiments thereof, refer to the descriptions of the beneficialeffects of the method according to the first aspect and the secondaspect and the embodiments thereof.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a structural diagram of a network according to an embodimentof this application;

FIG. 2 is a structural diagram of another network according to anembodiment of this application;

FIG. 3 is a schematic diagram of a running plane of a node in an ANIMAdomain according to an embodiment of this application;

FIG. 4 is a flowchart of a forwarding entry monitoring method accordingto an embodiment of this application;

FIG. 5 is a schematic diagram of an encapsulation manner of a secondpacket according to an embodiment of this application;

FIG. 6 is a schematic diagram of an encapsulation manner of a firstpacket according to an embodiment of this application;

FIG. 7 is a schematic structural diagram of a forwarding entrymonitoring apparatus according to an embodiment of this application;

FIG. 8 is a schematic structural diagram of another forwarding entrymonitoring apparatus according to an embodiment of this application;

FIG. 9 is a schematic structural diagram of another forwarding entrymonitoring apparatus according to an embodiment of this application; and

FIG. 10 is a schematic structural diagram of another forwarding entrymonitoring apparatus according to an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

The following clearly and entirely describes the technical solutions inthe embodiments of this application with reference to the accompanyingdrawings in the embodiments of this application.

In the following, some terms of the embodiments of this application aredescribed, to help a person skilled in the art has a betterunderstanding.

(1) A data stream is a set of a plurality of data frames or data packetson a same transmission path. The data stream may be represented by anidentifier of the transmission path of the data stream. The identifierof the transmission path may include information about each node on thetransmission path, or the identifier of the transmission path mayinclude information about only a starting node and a destination node.Certainly, the identifier of the transmission path may alternatively beother information. This is not limited in this embodiment of thisapplication.

(2) A node device may also be referred to as a node. The node may be aforwarder, a switch, a bridge, a gateway, a router, or the like.Alternatively, the node may be a logical or virtual device capable offorwarding a data stream.

(3) An autonomic network is a network system formed by a group of nodescapable of receiving and sending a data stream. A node in the autonomicnetwork may join or leave the autonomic network at any time, and anetwork topology of the autonomic network changes at any time as thenode joins or leaves. When a node in the autonomic network communicateswith a node outside the autonomic network, forwarding needs to beperformed through another node in the autonomic network. A solution ofthe autonomic network may include an autonomic networking integratedmodel and approach (ANIMA) network. Certainly, with evolution ofcommunications technologies, the solution of the autonomic network mayalternatively be another solution. This is not limited herein.

(4) A single domain is an autonomic network domain formed by nodes(devices) having a single trust relationship. For example, the autonomicnetwork domain is an ANIMA domain. As shown in FIG. 1, nodes R2 to R5form an ANIMA domain. There is a single digital certificateauthentication server (Registrar) in the ANIMA domain. Certainly, aplurality of Registrars may be actually deployed due to reliability orsystem performance. These Registrars are equivalent in terms offunction, and therefore may be logically considered as one Registrar. Inthe ANIMA domain, the Registrar issues a domain certificate to the nodesR2 to R5, and the nodes R2 to R5 establish a trust relationship witheach other based on the (commonly owned) domain certificate. Therefore,the nodes can freely and securely communicate with each other.

(5) A multi-domain is an autonomic network domain formed by a pluralityof single domains. For example, the autonomic network domain is an ANIMAdomain. As shown in FIG. 2, nodes R2 to R4 form an ANIMA single domain,and nodes R5 and R6 form another ANIMA single domain. The ANIMA networkis a multi-domain ANIMA network. The ANIMA domains are managed bydifferent Registrars. For example, the nodes R2 to R4 are managed by aRegistrar 1, the nodes R5 and R6 are managed by a Registrar 2. TheRegistrar 1 and the Registrar 2 use different domain certificates. Inthis case, the nodes R2 to R4 may communicate with each other based on adomain certificate issued by the Registrar 1, and the nodes R5 and R6communicate with each other based on a domain certificate issued by theRegistrar 2. If a trust relationship needs to be established between aplurality of ANIMA domains, some dedicated mechanisms are furtherrequired. These mechanisms are not limited herein.

(6) Ingress node: When a change status of a forwarding entry, on a partof or an entire transmission path of a data stream, needs to bemonitored, as shown in FIG. 1, the part of the transmission path, of thedata stream, that needs to be monitored is a transmission pathcorresponding to the nodes R2 to R5, a starting node on the monitoredtransmission path is an ingress node. For example, the node R2 is theingress node.

(7) Transmit node: When a change status of a forwarding entry, on a partof or an entire transmission path of a data stream, needs to bemonitored, as shown in FIG. 1, the part of the transmission path, of thedata stream, that needs to be monitored is the transmission pathcorresponding to the nodes R2 to R5, an intermediate node on themonitored transmission path is a transmit node. For example, the nodesR3 and R4 are transmit nodes.

(8) Egress node: When a change status of a forwarding entry, on a partof or an entire transmission path of a data stream, needs to bemonitored, as shown in FIG. 1, the part of the transmission path, of thedata stream, that needs to be monitored is the transmission pathcorresponding to the nodes R2 to R5, an end node on the monitoredtransmission path is an egress node. For example, the node R5 is theegress node.

(9) Target node: For a data stream, an end node of a transmission pathof the data stream is a target node. When the end node of thetransmission path of the data stream is the same as an end node of amonitored transmission path, for example, as shown in FIG. 1, thetransmission path of the data stream and a to-be-monitored transmissionpath are the transmission path corresponding to the nodes R2 to R5, thetarget node is an egress node. When the end node of the transmissionpath of the data stream is different from the end node of the monitoredtransmission path, for example, the transmission path of the data streamis a transmission path corresponding to nodes R1 to R6, and theto-be-monitored transmission path is the transmission path correspondingto the nodes R2 to R5, the target node is the node R6, and the egressnode is the node R5. Therefore, a destination node is different from theegress node.

It should be noted that the ingress node, the transmit node, and theegress node are associated with the to-be-monitored transmission path.To be specific, when different transmission paths are monitored,corresponding ingress nodes, transmit nodes, and egress nodes may bedifferent. For example, as shown in FIG. 1, when the monitoredtransmission path is a transmission path corresponding to the nodes R2to R4, the ingress node is the node R2, the transmit node is the nodeR3, and the egress node is the node R4 correspondingly. When themonitored transmission path is a transmission path corresponding to thenodes R3 to R5, the ingress node is the node R3, the transmit node isthe node R4, and the egress node is the node R5 correspondingly.

(10) A management internet protocol (IP) address is used by anotherdevice, such as a server, to use an address connected to another remotelogin protocol such as a remote terminal protocol (Telnet) or a remotedisplay protocol (RDP). Therefore, after the another device is connectedto the node, the node is managed, controlled and the like through theanother device.

(11) “A plurality of” refers to two or more than two.

It should be noted that, unless otherwise stated, in the embodiments ofthis application, ordinal numbers such as “first”, “second”, “third”,and “fourth” are used to distinguish between a plurality of objects, andnot intended to limit an order, a time sequence, priorities, orimportance of the plurality of objects.

In addition, the term “and/or” in the embodiments of this applicationdescribes only an association relationship for describing associatedobjects and represents that three relationships may exist. For example,A and/or B may represent the following three cases: Only A exists, bothA and B exist, and only B exists. In addition, unless otherwise stated,the character “/” in this specification generally indicates an “or”relationship between the associated objects.

In the prior art, when a service is interrupted due to a change of aforwarding entry, an administrator needs to perform operations such asping segmentation or trace route for a plurality of times, to checkconnectivity of a transmission path and determine a faulty node deviceor link. Then, a plurality of forwarding entries on the faulty nodedevice are manually checked, to determine a changed forwarding entry.The operations are complex, and locating efficiency is low.

Based on this, the embodiments of this application provide a forwardingentry monitoring method and apparatus, to quickly determine the changedforwarding entry, thereby improving locating efficiency.

The technical solutions in the embodiments of this application may beapplied to various communications networks, such as an NR network, anLTE network, an advanced long term evolution (LTE-A) network, anautonomic network, a next-generation mobile communications system, andthe like.

In addition, the technical solutions in the embodiments of thisapplication may be further applicable to a future-orientedcommunications network. A network described in the embodiments of thisapplication is intended to describe the technical solutions in theembodiments of this application more clearly, and constitutes nolimitation on the technical solutions provided in the embodiments ofthis application. A person of ordinary skill in the art may learn that,with evolution of a network architecture, the technical solutionsprovided in the embodiments of this application are also applicable to asimilar technical problem.

An application scenario of the embodiments of this application isbriefly described below.

FIG. 1 is a structural diagram of a network according to an embodimentof this application. An example in which the network is an autonomicnetwork solution, for example, an ANIMA network, is used. The structuraldiagram shown in FIG. 1 includes six nodes, which are the nodes R1 toR6. The nodes R2 to R5 form a single-domain ANIMA network. The nodes R2to R5 are located in an ANIMA domain. The nodes R1 and R6 are nodesoutside the ANIMA domain.

The following describes the ANIMA network and the nodes in the ANIMAnetwork.

The ANIMA network includes two parts: an autonomic service agent (ASA)and an autonomic networking infrastructure (ANI). The ASA is configuredto complete a management task of the ANIMA network, for example,configure a corresponding service or parameter for each node in theANIMA network. The ANI is an infrastructure platform of the ANIMAnetwork, including a secure bootstrap module configured to complete anode authentication process and allocate an ANIMA domain certificate toa node; an autonomic control plane (ACP) that establishes a hop-by-hopsecurity tunnel with a neighboring node to implement interworkingbetween all nodes in the ANIMA domain; and a generic autonomic signalingprotocol (GRASP) running in the ACP.

The nodes R2 to R5 are nodes in the ANIMA network, and may be referredto as autonomic nodes or ACP nodes. To support a function of the ANIMAnetwork, as shown in FIG. 3, each ACP node includes two running planes:an ACP virtual private network routing and forwarding (VRF) plane and aservice plane. The service plane may also be referred to as a dataplane. At least one ASA runs on the ACP VRF plane of each ACP node, andeach ASA may process a different service. For example, in FIG. 3, theACP node includes an ASA 1 and an ASA 2. The ASA 1 may process avideo-type service of the ACP node. The ASA 2 may process a text-typeservice and the like of the ACP node. The service plane of the ACP nodeincludes a forwarding database (FDB). The FDB includes variousforwarding entries, for example, an IP forwarding entry or amulti-protocol label switching (MPLS) forwarding entry. For ease ofdescription, the ACP VRF plane and the data plane are used as an examplein the following description.

The ACP VRF plane of each ACP node is independent of the data plane ofthe ACP node. In each ACP node, the ACP VRF plane and the data plane ofthe ACP node may securely access all data of each other. ACP VRF planesand data planes of different ACP nodes have independent transmissionchannels. For example, a data plane of the node R2 may communicate witha data plane of the node R3 through a first transmission channel. An ACPVRF plane of the node R2 may communicate with an ACP VRF plane of thenode R3 through a second transmission channel different from the firsttransmission channel. In addition, when the data plane of the node R2 isfaulty and cannot communicate with the data plane of the node R3, theACP VRF plane of the node R2 may still communicate with the ACP VRFplane of the node R3 through the second transmission channel.Connectivity of the ACP VRF planes of the different ACP nodes is notassociated with connectivity of the data planes of the different ACPnodes.

It should be noted that, for the foregoing content, refer tocorresponding content in a standard file, and details are not describedherein again. The standard file isdraft-ietf-anima-autonomic-control-plane “RFC8368”.

In addition, it should be noted that in the application scenario shownin FIG. 1, that the network is an ANIMA network is merely used as anexample for description, and should not constitute a limitation on theapplication scenario of this application. In actual application, anothernetwork architecture may be further included. This is not limited inthis embodiment of this application.

The following describes the technical solutions provided in theembodiments of this application with reference to the accompanyingdrawings. In the following description process, the technical solutionsprovided in this application are applied to the application scenarioshown in FIG. 1.

FIG. 4 is a flowchart of a forwarding entry monitoring method accordingto an embodiment of this application. The flowchart is described asfollows.

Operation 401: A second node receives a first instruction.

In this embodiment of this application, the first instruction instructsthe second node to monitor whether a forwarding entry that is on atransmission path of a data stream and that is used to forward the datastream changes. It should be noted that, the forwarding entry that is onthe transmission path and that is used to forward the data stream may beunderstood as a forwarding entry that is on a node of the transmissionpath and that is used to forward the data stream, or may be understoodas a forwarding entry that is on each node of the transmission path andthat is used to forward the data stream. This is not limited herein.

In this embodiment of this application, the second node is an ingressnode of a to-be-monitored transmission path. For ease of description,the second node is the node R2 shown in FIG. 1.

Specifically, an embodiment of operation 401 may include but is notlimited to the following two manners:

Manner 1:

Before operation 401, an administrator sets names and passwords for thesix nodes in the network shown in FIG. 1 through an operation andmaintenance (OM) interface, for example, a command line, a graphicalinterface, or a dos interface. The name may be a sequence number of eachnode, for example, 01, 02, 03, or the like. Alternatively, the name maybe another name set by the administrator for each node. This is notlimited herein. The passwords for the nodes may be the same ordifferent. In this way, the administrator can enter a name and apassword of a node in the OM interface to log in to the node asrequired. Certainly, the names and the passwords of the nodes mayalternatively be automatically generated by a network. This is notlimited herein.

When the administrator needs to monitor whether the forwarding entry onthe transmission path of the data stream changes, the administrator maylog in to one node on the transmission path through the OM interface,for example, a starting node R2 on the transmission path; enter a nameand a password of the starting node R2 through the OM interface; log into the starting node R2; and output the first instruction to the nodeR2. The first instruction carries an identifier of the transmission pathof the monitored data stream, so that the node R2 can perform acorresponding operation according to the first instruction.

Because the first instruction is entered by the administrator after theadministrator logs in to one node on the transmission path, in thismanner, a process of monitoring whether the forwarding entry on thetransmission path changes does not depend on a network management system(NMS), and can be implemented easily.

Manner 2:

To ensure correct transmission of the data stream, before determiningthat the data stream needs to be sent, the NMS may query whether theforwarding entry on the transmission path of the data stream changes. Inthis manner, the NMS may directly send the first instruction to thestarting node R2 on the transmission path.

In this embodiment of this application, the first instruction mayinclude the following parameters.

(1) An operation type, which may be an operation type of subscribingwhether the forwarding entry on the transmission path of the data streamchanges. Specifically, a plurality of operation types may bepreconfigured for each node in an ANIMA domain. For example, theplurality of operation types may include the operation type ofsubscribing whether the forwarding entry on the transmission path of thedata stream changes, an operation type of obtaining a forwarding entryon a specified node, and an operation type of obtaining a status of anoutbound interface of a specified node. The specified node may be set bythe administrator or the NMS. Each operation type corresponds to asequence number. To be specific, the operation type of subscribingwhether the forwarding entry on the transmission path of the data streamchanges corresponds to a sequence number 00; the operation type ofobtaining the forwarding entry on the specified node corresponds to asequence number 01; and the operation type of obtaining the status ofthe outbound interface of the specified node corresponds to a sequencenumber 10. In this embodiment of this application, if the operation typeis the operation type of subscribing whether the forwarding entry on thetransmission path of the data stream changes, a parameter value of theoperation type is 00. Certainly, the parameter value of the operationtype may alternatively be other content. This is not limited herein.

(2) An identifier and/or an egress node of the transmission path of thedata stream. The identifier of the transmission path of the data streammay be a target node of the data stream. For example, an index number ofthe target node of the data stream may be used to indicate the targetnode. For example, if the target node is the node R4, the index numberis 4. Alternatively, an address, of the target node of the data stream,in the forwarding entry may be used to indicate the target node. Forexample, when a forwarding model of the ANIMA domain is an IP forwardingmodel, an IP address of the target node may be used to indicate thetarget node. When the forwarding model is a multi-protocol labelswitching (MPLS) forwarding model, the IP address of the target node anda label in a LABEL table may be used to indicate the target node.Certainly, if another forwarding model is used for the ANIMA domain,corresponding content is correspondingly used to indicate the targetnode. Details are not described herein again.

When the egress node may be the same as the target node of the datastream, only the target node of the data stream may be indicated. Whenthe egress node is different from the target node of the data stream,the target node and the egress node may be separately indicated.Certainly, the egress node may alternatively be determined by a node inthe ANIMA domain based on the target node of the data stream. Forexample, in the network shown in FIG. 1, the target node of the datastream is the node R6. When only the node R6 is set as the target node,because the node R5 is an edge node in the ANIMA domain, the node R5 isautomatically determined as an egress node.

(3) An operation flow control parameter, which may include a quantity ofnodes that perform an operation, a timeout period of the operation, asending interval of a packet used to indicate the operation to each nodeon the transmission path, an encapsulation parameter of the packet usedto indicate the operation to each node on the transmission path, and thelike.

(4) A feedback output control parameter, which may include a detail of achange of a forwarding entry fed back by each node on the transmissionpath to the node to which the administrator logs in. For example, thedetail may include a detail of feeding back whether the change occurs, adetail of feeding back whether the change occurs and feeding backchanged content, or the like. The detail may further include an outputcontrol parameter of information carried in a packet used to feedbackwhether the forwarding entry changes. For example, the detail displayssystem time at which the packet used to feedback whether the forwardingentry changes is sent, an inbound interface of the packet, and the like.The detail may further include whether to record error information in acache or whether to record content of the packet used for feedback in alog file.

It should be noted that the parameters included in the first instructioninclude at least the identifier of the transmission path of the datastream. If the first instruction includes only the identifier of thetransmission path of the data stream and does not include anotherparameter, the starting node R2 may determine a value of the anotherparameter based on content stipulated in a protocol or preconfiguredcontent. A specific determining manner is not described herein again.

Operation 402: The second node determines a first node.

After receiving the first instruction, the node R2 queries a local FDBthrough an ASA on an ACP VRF plane, to obtain a forwarding entry storedon the node R2. For example, the forwarding entry is an IP routingentry. In this embodiment of this application, each node in the ANIMAdomain has an ACP VRF plane and a data plane, and the ACP VRF plane andthe data plane have independent forwarding planes. Therefore, each nodein the ANIMA domain has two addresses. One is a unique local IPv6unicast address (ULA) corresponding to the ACP VRF plane of the node,and the other is a management IP address corresponding to the data planeof the node, as shown in Table 1. In Table 1, each node has one ACP ULAaddress and one management IP address.

TABLE 1 R1 ACP ULA FDA3:79A6 :F6EE::1 Data plane management IP address10::10 R2 ACP ULA FDA3:79A6 :F6EE::2 Data plane management IP address20::20 R3 ACP ULA FDA3:79A6 :F6EE::3 Data plane management IP address30::30 R4 ACP ULA FDA3:79A6 :F6EE::4 Data plane management IP address40::40

The IP routing entry is shown in Table 1. An address in Table 1 is adata plane management IP address. It can be learned from Table 1 that anext-hop node of the node R2 is the node R3, and the node R3 isconnected to an interface Eth2. Therefore, the node R2 determines, basedon the IP routing table, that the first node is the node R3. In thisembodiment, the first node is the node R3.

TABLE 2 Destination address Prefix length Next hop Outbound interface(40::40) 64 R3 Eth2 (30::30) 64 R3 Eth2 (20::20) 64 R3 Eth2

Operation 403: The second node sends a second packet to the first node,and the first node receives the second packet.

In this embodiment of this application, the second packet is used toobtain status information of a first forwarding entry, stored on thefirst node, that is used to forward the data stream. The statusinformation is used to indicate whether the forwarding entry changes.

After the node R2 determines that the next-hop node is the node R3, theASA of the second node generates, based on the parameters in the firstinstruction, the second packet sent to the node R3. The followingdescribes an encapsulation format of the second packet.

In an example, as shown in FIG. 5, the encapsulation format of thesecond packet is divided into three parts: a transport header, a userdatagram protocol header (UDP header), and a GRASP packet.

The ASA of the second node may determine a specific format of thetransport header based on a forwarding model of the ANIMA network. Forexample, if the forwarding model of the ANIMA network is a native IPforwarding model, such as a Native IPv4 forwarding model or a NativeIPv6 forwarding model, the ASA may use an encapsulation header of aninternet protocol version 4 (IPv4) or an encapsulation header of aninternet protocol version 6 (IPv6). If the forwarding model of the ANIMAnetwork is an internet protocol tunnel (IP tunnel) forwarding model, theASA may use an encapsulation header of IP in IP or an encapsulationheader of a combination of an IP protocol and a generic routingencapsulation (GRE) protocol. If the forwarding model of the ANIMAnetwork is an MPLS forwarding model, the ASA may use an encapsulationheader of a combination of a multi-protocol label stack (MPLS labelstack) and the IP protocol. If the forwarding model of the ANIMA networkis a forwarding model of a virtual extensible local area network(VXLAN), the ASA may use a combination of a VXLAN tunnel header, an Ethheader, and an IP header.

The UDP_Header includes a destination port (DestPort) and a source port(SrcPort). The DestPort is a listening port of a GRASP, and is (referredto as a well-known port) generally uniformly allocated by an internetassigned numbers authority (IANA). For details, refer to descriptions insection 6 of the standard document draft-ietf-anima-grasp-15. TheSrcPort may be randomly allocated by the ASA. A range of the port numbervaries due to different embodiments by different vendors or somedifferent configuration commands. Generally, the range is [1025, 65535],and the range may be set based on an actual situation. This is notlimited herein.

The GRASP packet includes a synchronization request message field, asession ID field, and an objective field. A value of the synchronizationrequest message field may be a synchronization request message in asynchronization mechanism of the GRASP. A value of the session ID fieldis randomly allocated by the ASA of the second node to the secondpacket, and is used to identify the second packet. The objective fieldincludes an objective-name field, an objective-flags field, a loop-countfield, and an objective-value field.

The following describes the objective field.

The objective-name is an objective name of the second packet, and isused to uniquely identify and manage the second packet. Theobjective-name may be formed by characters in a unicode transformationformat (UTF-8). A length of the characters is not limited in thisembodiment of this application. The objective-name may be classifiedinto two types: a standard name and a private name. The standard name isallocated by the IANA. The private name may be defined by the ASA of thesecond node. For example, the ASA may define the private name as “huawei.com:PathStatusSubcribe”. It should be noted that the private nameincludes at least one “:”.

The objective-flags is used to indicate the operation type in the firstinstruction. For example, a plurality of operation types may include theoperation type of subscribing whether the forwarding entry on thetransmission path of the data stream changes, the operation type ofobtaining the forwarding entry on the specified node, and the operationtype of obtaining the status of the outbound interface of the specifiednode. In this embodiment of this application, the operation type is theoperation type of subscribing whether the forwarding entry on thetransmission path of the data stream changes, and may be marked asF_SYNCH. In this case, a value of the objective-flags may be F_SYNCH.

The loop-count is used to avoid an infinite loop of an operation. Avalue of the field is obtained from the operation flow control parameterin the first instruction, and the value of the loop-count may beassociated with a destination address of the monitored data stream. Forexample, the destination address is (40::40), but an address of thesecond node R2 is (10::10). In this case, a maximum of three nodes existbetween the second node R2 and a node corresponding to the destinationaddress, so that the loop-count may be set to 3. Certainly, theloop-count may alternatively be set to another value. This is notlimited herein.

The objective-value field includes an address field of an ingress nodeof the monitored data stream, an address field of a current node, aninformation field related to the transmission path of the monitored datastream, and a control flag field. These fields are respectively markedas ingress, current, path-info, and control-flags. A value of each pieceof content in the field is obtained based on the identifier and theegress node of the transmission path of the data stream, the operationflow control parameter, and the feedback output control parameter in thefirst instruction. Each node in the ANIMA domain corresponds to twoaddresses: the ACP ULA and the data plane management IP address.Therefore, both the ingress field and the current field include an ACPULA address and a management IP address of a corresponding node, andspecific values are not described herein again.

The path-info field includes a path type field, a path status field, anda path keyword field, and these fields are respectively marked aspath-type, path-status, and path-keys. The path-status is used toidentify a state of a path. For example, a value of the path-status maybe a continued state, a sub-branch state, a broken state, a terminatedstate, or the like. The path-keys is a key field that identifies a pathinstance. A specific value of the path-keys varies based on path-type.

The control-flags may include the following flags:

(1) A transit flag, which may be marked as CF_TRANSIT. The flag is usedto indicate whether a node on the transmission path needs to forward thesecond packet to a next-hop node when the node does not support theobjective. A value of the CF_TRANSIT being 0 indicates that the node maynot forward the second packet to the next-hop node. The value ofCF_TRANSIT being 1 indicates that the node must forward the secondpacket to the next-hop node.

(2) An all-subpath flag, which may be marked as CF_ALL_SUBPATH. The flagis used to indicate, if a node on the transmission path finds aplurality of next-hop nodes, whether the node needs to replicate andforward the second packet to all the next-hop nodes. A value of theCF_ALL_SUBPATH being 0 indicates that the node may not replicate andforward the second packet to all the next-hop nodes, but selects onenext-hop node through a hash algorithm. The value of the CF_ALL_SUBPATHbeing 1 indicates that the node must replicate the second packet andforward the second packet to all the next-hop nodes.

(3) An operation type, which may be marked as op-type. In thisembodiment of this application, the op-type may be set to a query type.

(4) A timeout, which may be marked as timeout. In this embodiment ofthis application, the timeout may be set to 0.

(5) A forwarding entry change type, which may be marked as type. Theforwarding entry change type may be as follows:

a) a path broken type, which may be marked as SUBFLAG_PATH_BROKEN;

b) when a primary path and a secondary path are set for the transmissionpath, a type of switching to the secondary path according to a fastreroute (FRR) method due to a fault or deletion of the primary path,where the type may be marked as SUBFLAG_PATH_FRR_SWITCH;

c) when the primary path and the secondary path are set for thetransmission path, a type of which the primary path remains unchanged,but a status of the secondary path changes, where the type may be markedas SUBFLAG_PATH_FRR_SLAVE_CHANGE;

d) a change type of an outbound interface status, where the type may bemarked as SUBFLAG_PATH_OUTIF_STATE_CHANGE;

e) a change type of a bidirectional forwarding detection (BFD) statusassociated with the transmission path, where the type may be marked asSUBFLAG_PATH_BFD_STATE_CHANGE; and

f) a modification type of a maximum transmission unit (MTU) of anoutbound interface, where the type may be marked asSUBFLAG_PATH_MTU_CHANGE.

After the node R2 generates the second packet based on the encapsulationformat of the second packet and the parameters included in the firstinstruction, the node R2 sends the second packet to the next-hop nodeR3.

To ensure that another node can receive the second packet, in thisembodiment of this application, the second packet is forwarded through atransmission channel for transmitting the data stream, for example, achannel of a data plane of the R2 node. The data stream is alsotransmitted on the data plane, and it can be learned from thedescription of the encapsulation format of the second packet that theencapsulation format of the second packet is similar to an encapsulationformat of the data stream. Therefore, when the second packet isforwarded in the ANIMA domain, each node may forward the second packetthrough the transmission path for transmitting the data stream, toensure high fitting between a transmission path of the second packet andthe transmission path of the data stream.

In addition, it should be noted that, because the second packet isforwarded through the data plane, and it may be learned from FIG. 3 thatthe ASA used to process a service on each node is located on the ACP VRFplane above the data plane, a hop-by-hop sending mechanism further needsto be set in the second packet. For example, a time to live (TTL) fieldof an IPv4/IPv6 packet, a (hop-limit) field of a quantity of hopsallowed during packet forwarding, a router alert field, or a label alertfield or a control word of an MPLS packet may be used for setting. Inthis way, after receiving the second packet, the another node can sendthe second packet to the ACP VRF plane through the data plane based onan indication of the field.

Operation 404: The second node monitors a forwarding entry that isstored on the second node and used to forward the data stream.

Specifically, after receiving the first instruction, the node R2 mayalso monitor, according to the first instruction, the forwarding entrythat is stored on the second node and used to forward the data stream,and determine whether the forwarding entry that is stored on the node R2and used to forward the data stream changes. In other words, afterdetermining the data stream to be monitored, the ASA of the node R2determines, through the local FDB, whether the forwarding entry used toforward the data stream changes.

It should be noted that operation 404 may be performed after operation403 is completed, or may be performed before operation 403 is performed.Certainly, operation 404 and operation 403 may be performed at the sametime. This is not limited herein. In addition, operation 404 is anoptional operation. In other words, operation 404 is not mandatory.

Operation 405: The first node determines a to-be-monitored data stream.

After receiving the second packet, the node R3 first reports the secondpacket to an ACP VRF plane of the node R3 according to the hop-by-hopsending mechanism that is set for the second packet. For example, thehop-by-hop sending mechanism is set based on the TTL field. When a TTLtimes out, the second packet is reported to the ACP VRF plane of thenode R3. Then, an ASA on the ACP VRF plane performs processing such asdecapsulation and decoding on the second packet, to obtain controlinformation of the second packet. The control information requires thenode R3 to query whether a forwarding entry, on the node R3, related toa transmission path monitored by the second packet changes. It should benoted that, as shown in FIG. 3, each node in the ANIMA domain includestwo ASAs. In this case, after receiving the second packet, the node R3may determine, based on an encapsulation parameter of the second packet,a type of the data stream monitored by the second packet, for example, avideo type or a text type, to send the second packet to a correspondingASA.

The ASA of the node R3 obtains the identifier, carried in the secondpacket, that is of the transmission path of the data stream, anddetermines, based on the identifier of the transmission path of the datastream, a to-be-monitored data stream corresponding to the secondpacket. For example, if the identifier of the transmission path of thedata stream is determined based on an IP address (40::40), included inthe second packet, of a destination node of the transmission path of thedata stream and an inbound interface number Eth1, included in the secondpacket, of the transmission path of the data stream, the ASA determinesthe data stream based on the IP address of the destination node and theinbound interface number.

It should be noted that, if a plurality of data streams arecorresponding to the IP address of the destination node and the inboundinterface number, for example, a video-type data stream 1 and atext-type data stream 2 may be transmitted on a transmission pathcorresponding to the IP address of the destination node and the inboundinterface number, the ASA may further determine, based on theencapsulation parameter of the second packet, the type of the datastream monitored by the second packet. For example, the data stream isdetermined to be of a video type. In this case, the ASA finallydetermines that the data stream monitored by the second packet is thedata stream 1. Certainly, the ASA may alternatively determine the datastream based on another parameter in the second packet. This is notlimited herein.

Operation 406: The first node determines that a stored forwarding entryused to forward the data stream changes.

After determining the data stream to be monitored by the second packet,the ASA of the node R3 determines, through the local FDB, whether theforwarding entry used to forward the data stream changes.

In an example, when the forwarding entry on the node R3 changes, acorresponding modification record may be stored in the FDB. In thiscase, if the ASA determines that a modification record of the forwardingentry used to forward the data stream is stored in the FDB, the ASAdetermines that the forwarding entry used to forward the data streamchanges. Certainly, the node R3 may alternatively determine, in anothermanner, that the forwarding entry changes. This is not limited herein.

Operation 407: The first node sends a first packet to the second node,and the second node receives the first packet.

In this embodiment of this application, the first packet carries achange indication. The change indication is used to indicate that theforwarding entry changes. For example, one bit in the first packet isused to indicate whether the forwarding entry changes. A value of thebit being 0 indicates that the forwarding entry does not change, and thevalue of the bit being 1 indicates that the forwarding entry changes.Alternatively, the change indication is used to indicate changed contentin the forwarding entry. For example, the ASA queries the modificationrecord of the forwarding entry in the FDB. After determining that theforwarding entry changes, the ASA may determine modified content basedon the modification record. For example, the modification record recordsthat an initial value 32 of an MTU of an outbound interface of the nodeR3 is modified to 16, so that the changed content of the forwardingentry is carried in the first packet and sent to the node R2.Alternatively, if the modification record stored in the FDB only recordsthat the forwarding entry is modified, but does not indicate themodified content, the node R3 may alternatively add the forwarding entrywithout modification and a modified forwarding entry to the firstpacket, and send the first packet to the node R2. The ASA may select achange indication manner based on an actual situation. This is notlimited herein.

The following describes an encapsulation format of the first packet.

In an example, as shown in FIG. 6, the encapsulation format of the firstpacket is divided into three parts: an IPv6 encapsulation header (IPv6over IPsec header) based on an internet protocol security (IPsec)mechanism, a UDP header, and a GRASP packet.

The IPv6 over IPsec header may be a Native IPsec encapsulation header,an IPsec with GRE encapsulation header, or the like.

Fields included in the UDP header and the GRASP packet are the same asthe fields included in the UDP header and the GRASP packet in the firstpacket, and content of a synchronization request message field and asession ID field in the GRASP packet is the same as that in the secondpacket. Details are not described herein again. The following describesan objective field in the GRASP packet.

objective-name, objective-flags, and loop-count are the same ascorresponding content in the second packet.

In this embodiment of this application, an objective-value fieldincludes an address field of an ingress node of the monitored datastream, an address field of a previous-hop node of a current node on thetransmission path, an address field of the current node, a role field ofthe current node, an information field related to the transmission pathof the monitored data stream, and a forwarding entry change type, andthese fields are respectively marked as ingress, upstream, current,role, path-info, and type. Same as the address fields in the secondpacket, in the first packet, the address fields include an ACP ULAaddress and a management IP address of a corresponding node. In thisembodiment of this application, the current node is the node R3, so thata value of the address field of the current node is an ACP ULA addressand a management IP address of the node R3. The previous-hop node of thecurrent node on the transmission path is the node R2, so that a value ofthe address field of the previous-hop node of the current node on thetransmission path is the ACP ULA address and the management IP addressof the node R2.

The role field indicates a node type of the current node on thetransmission path. The node type may be any one of transit, egress, ortarget. For example, the ASA of the node R3 queries the FDB to obtainthe forwarding entry, on the node R3, that is used to forward the datastream. The forwarding entry is shown in Table 3. There is a next-hopnode in Table 3. Because the node R3 receives the second packet from thenode R2, the node R3 is not an ingress of the transmission path.Therefore, the ASA of the node R3 determines that a node type of thenode R3 is transit.

TABLE 3 Destination address Prefix length Next hop Outbound interface(40::40) 64 R4 Eth4 (30::30) 64 R4 Eth4

Content included in the path-info field is the same as that in thesecond packet, and details are not described herein again.

A value of the type field is associated with the second packet and achange status of a forwarding entry of the current node. Specifically,the node R3 obtains, through the first packet, the forwarding entrychange type, including: (a) the path broken type; (b) when the primarypath and the secondary path are set for the transmission path, the typeof switching to the secondary path according to the FRR method due tothe fault of deletion of the primary path; (c) when the primary path andthe secondary path are set for the transmission path, the type of whichthe primary path remains unchanged, but the status of the secondary pathchanges; (d) the change type of the outbound interface status; (e) thechange type of the BFD status associated with the transmission path, and(f) the modification type of the MTU of the outbound interface. Whendetermining that a forwarding entry in the FDB changes, the node R3determines, based on changed content, that a change type is one of theforegoing six types. For example, if the ASA of the node R3 determinesthat an MTU of an outbound interface of the forwarding entry changes,the ASA of the node R3 determines that the value of the type field isSUBFLAG_PATH_MTU_CHANGE.

After the node R3 generates the first packet based on the encapsulationformat of the first packet, an address of the current node, and thechange status of the forwarding entry, the node R3 sends the firstpacket to a previous-hop node R2.

To prevent a transmission path, of the data plane, that is used totransmit the data stream from being interrupted due to a forwardingentry change, in this embodiment of this application, a first channeldifferent from the transmission channel of the data stream may be usedto send the first packet to the second node. For example, the firstchannel may be a transmission channel of the ACP VRF plane. Because thedata plane and the ACP VRF plane have mutually independent channels, itcan be ensured that transmission of the first packet is not affected bya fault of the data plane and the first packet can be sent to the secondnode.

Operation 408: The first node sends the second packet to a third node,and the third node receives the second packet.

In this embodiment of this application, the third node is a next-hopnode of the first node on the transmission path of the data stream,namely, the node R4.

Specifically, the ASA of the node R3 queries the FDB to obtain theforwarding entry shown in Table 3. Because the next-hop node R4 existsin the forwarding entry, the ASA of the node R3 forwards, to the nodeR4, the second packet received from the node R2.

It should be noted that, the node R3 forwards the second packet, in asame manner as the node R2, through the transmission channel fortransmitting the data stream, for example, a second channel of the dataplane.

Operation 409: The third node determines the monitored data stream.

Operation 410: The third node determines that a stored forwarding entryused to forward the data stream changes.

Operation 411: The third node sends a third packet to the second node,and the second node receives the third packet.

In this embodiment of this application, the third packet is used tocarry a second change indication. The second change indication is usedto indicate that a second forwarding entry, stored on the third node,that is used by the third node to forward the data stream changes.

It should be noted that the third node may directly send the thirdpacket to the second node, or may forward the third packet through thefirst node. This is not limited herein. After receiving the secondpacket, if the third node determines, based on the forwarding entry onthe third node, that the third node is an egress node of thetransmission path, the third node does not need to forward the secondpacket.

In this embodiment of this application, an encapsulation format of thethird packet is the same as that of the first packet. Specific contentin the third packet is generated based on a change status of theforwarding entry, and specific operations may be the same ascorresponding content in the first packet. The second change indicationis the same as the first change indication. Operation 408 to operation410 are the same as operation 404 to operation 406. Details are notdescribed herein again.

In addition, it should be noted that operation 407 to operation 410 areoptional operations. In other words, operation 407 to operation 410 arenot mandatory. For example, the first node determines that the firstnode is a termination node of the transmission path. In this case,operation 407 to operation 410 do not need to be performed. In FIG. 4,an example in which operation 407 to operation 410 are performed isused. In this embodiment of this application, an execution sequence ofoperation 406 and operation 407 to operation 410 is not limited. To bespecific, operation 407 to operation 410 may be performed beforeoperation 406, or operation 406 and operation 407 to operation 410 maybe performed at the same time.

Operation 412: The second node determines, based on the first packetand/or the third packet, the transmission path used to forward the datastream.

In the example in which operation 407 to operation 410 are performed inthe method in this embodiment of this application, after receiving thefirst packet, the node R2 determines, based on a node identifier of thesecond node and a node identifier of the first node that are carried inthe first packet, that a part of the transmission path of the datastream is the node R2→ the node R3. The node identifier may be an ACPULA address of the node and/or a data plane management IP address of thenode. Then, the node R2 determines, based on the node identifier of thefirst node and a node identifier of the third node that are carried inthe third packet, that a part of the transmission path of the datastream is the node R3→ the node R4, and a role of the third node in thethird packet is target, thereby obtaining that the transmission path ofthe data stream is: the node R2→ the node R3→ the node R3→ the node R4.In this way, based on a packet returned by each node on the transmissionpath, the second node restores the transmission path of the data stream,implements path discovery, and obtains a change status of a forwardingentry on the transmission path. In this way, when a fault that the datastream cannot be forwarded due to the forwarding entry occurs on thetransmission path, the first node may quickly determine that a node onwhich a forwarding entry changes may be a faulty node. This may improvelocating efficiency.

Operation 413: The second node generates prompt information.

After the node R2 receives the first packet, the node R2 obtains achange indication in the first packet in a processing manner such asdecapsulation and decoding. For example, the change indication may bethe type field in the first packet. Then, the node R2 determines, basedon a change type indicated in the type field, whether a change of theforwarding entry on the node R3 causes interruption during thetransmission of the data stream. For example, the change type indicatedin the type field is the path broken type or the modification type ofthe MTU of the outbound interface. In this case, the change of theforwarding entry may cause a failure to transmit the data stream.Therefore, the node R2 may output corresponding prompt information, forexample, may output an alert through screen printing, or report thechange to the NMS through a simple network management protocol (SNMP).

If the node R2 determines that the change type of the forwarding entryon the node R3 is the type of which the primary path remains unchanged,but the status of the secondary path changes when the primary path andthe secondary path are set for the transmission path, or the change typeof the outbound interface status, the change of the forwarding entrydoes not cause the failure to transmit the data stream. Therefore, thenode R2 may record the change status through a syslog function.

The node R2 processes the received third packet in the foregoing samemanner. Details are not described herein again.

It should be noted that, if the node R2 monitors the forwarding entrythat is stored on the node R2 and used to forward the data stream, anddetermines that the forwarding entry stored on the node R2 also changes,the node R2 also needs to perform the foregoing processing on thechanged forwarding entry of the node R2. Details are not describedherein again.

It should be noted that operation 408 to operation 413 are optionaloperations. In other words, operation 408 to operation 413 are notmandatory.

In addition, it should be noted that some names such as the ACP VRFplane and the data plane are described by using a current ANIMA networkas an example, and may change with network evolution. For specificevolution, refer to descriptions in a corresponding standard. Inaddition, when the foregoing technical solution is applied to anothernetwork, the ACP VRF plane, the data plane, or the like arecorresponding to a module, a virtual component, or the like that has acorresponding function in the another network.

According to the foregoing technical solution, when a forwarding entryon a node of the transmission path of the data stream changes, the nodemay report a change to a previous-hop node on the transmission path.Therefore, in this way, a node on the transmission path can obtain achange status of the forwarding entry on the transmission path. In thisway, when the fault that the data stream cannot be forwarded due to theforwarding entry occurs on the transmission path, the first node mayquickly determine that the node on which the forwarding entry changesmay be the faulty node. This may improve locating efficiency.

In the foregoing embodiments provided in this application, the methodprovided in the embodiments of this application is described separatelyfrom perspectives of the first node, the second node, and interactionbetween the first node and the second node. To implement functions inthe method provided in the embodiments of this application, the firstnode and the second node may include a hardware structure and/or asoftware module, and implement the functions in a form of the hardwarestructure, the software module, or a combination of the hardwarestructure and the software module. Whether a function of the functionsis performed by the hardware structure, the software module, or thecombination of the hardware structure and the software module depends ona specific application and a design constraint condition of thetechnical solution.

FIG. 7 is a schematic structural diagram of a forwarding entrymonitoring apparatus 700. The forwarding entry monitoring apparatus 700may be a first node, and can implement a function of the first node inthe method provided in the embodiments of this application.Alternatively, the forwarding entry monitoring apparatus 700 may be anapparatus that can support the first node in implementing the functionof the first node in the method provided in the embodiments of thisapplication. The forwarding entry monitoring apparatus 700 may be a0hardware structure, a software module, or a combination of a hardwarestructure and a software module. The forwarding entry monitoringapparatus 700 may be implemented as a chip system. In this embodiment ofthis application, the chip system may include a chip, or may include achip and another discrete component.

The forwarding entry monitoring apparatus 700 may include a processingunit 701, a storage unit 702, and a sending unit 703.

The processing unit 701 may be configured to perform operation 404 oroperation 405 in the embodiment shown in FIG. 4, and/or configured tosupport another process of the technology described in thisspecification.

The storage unit 702 may be configured to store the forwarding entry inoperation 405 in the embodiment shown in FIG. 4, and/or configured tosupport another process of the technology described in thisspecification.

The sending unit 703 may be configured to perform operation 406 oroperation 407 in the embodiment shown in FIG. 4, and/or configured tosupport another process of the technology described in thisspecification. The sending unit 703 is used by the forwarding entrymonitoring apparatus 700 to communicate with another module, and may bea circuit, a component, an interface, a bus, a software module, atransceiver, or any other apparatus that can implement communication.

All related content of the operations in the foregoing method embodimentmay be cited in function descriptions of corresponding function modules.Details are not described herein again.

FIG. 8 is a schematic structural diagram of a forwarding entrymonitoring apparatus 800. The forwarding entry monitoring apparatus 800may be a second node, and can implement a function of the second node inthe method provided in the embodiments of this application.Alternatively, the forwarding entry monitoring apparatus 800 may be anapparatus that can support the second node in implementing the functionof the second node in the method provided in the embodiments of thisapplication. The forwarding entry monitoring apparatus 800 may be ahardware structure, a software module, or a combination of a hardwarestructure and a software module. The forwarding entry monitoringapparatus 800 may be implemented as a chip system. In this embodiment ofthis application, the chip system may include a chip, or may include achip and another discrete component.

The forwarding entry monitoring apparatus 800 may include a processingunit 801, a storage unit 802, and a sending unit 803.

The processing unit 801 may be configured to perform any one ofoperation 402, operation 411 and operation 412 in the embodiment shownin FIG. 4, and/or configured to support another process of thetechnology described in this specification.

The storage unit 802 may be configured to store the forwarding entry inoperation 402 in the embodiment shown in FIG. 4, and/or configured tosupport another process of the technology described in thisspecification.

The sending unit 803 may be configured to perform operation 403 in theembodiment shown in FIG. 4, and/or configured to support another processof the technology described in this specification. The sending unit 803is used by the forwarding entry monitoring apparatus 800 to communicatewith another module, and may be a circuit, a component, an interface, abus, a software module, a transceiver, or any other apparatus that canimplement communication.

All related content of the operations in the foregoing method embodimentmay be cited in function descriptions of corresponding function modules.Details are not described herein again.

Division into modules in the embodiments of this application is anexample, is merely logical function division, and may be other divisionin an embodiment. In addition, functional modules in the embodiments ofthis application may be integrated into one processor, or each of themodules may exist alone physically, or two or more modules may beintegrated into one module. The integrated module may be implemented ina form of hardware, or may be implemented in a form of a softwarefunctional module.

FIG. 9 shows a forwarding entry monitoring apparatus 900 according to anembodiment of this application. The forwarding entry monitoringapparatus 900 may be a first node, and can implement a function of thefirst node in the method provided in the embodiments of thisapplication. Alternatively, the forwarding entry monitoring apparatus900 may be an apparatus that can support the first node in implementingthe function of the first node in the method provided in the embodimentsof this application. The forwarding entry monitoring apparatus 900 maybe a chip system. In this embodiment of this application, the chipsystem may include a chip, or may include a chip and another discretecomponent.

The forwarding entry monitoring apparatus 900 includes at least oneprocessor 920, configured to implement or support the forwarding entrymonitoring apparatus 900 in implementing the function of the first nodein the method provided in the embodiments of this application. Forexample, the processor 920 may determine a monitored data stream anddetermine that a forwarding entry changes. For example, the processor920 is configured to determine the monitored data stream based on areceived second packet, and the processor 920 is further configured todetermine that a stored forwarding entry used to forward the data streamchanges. For details, refer to detailed descriptions in the methodexample. The details are not described herein again.

The forwarding entry monitoring apparatus 900 may further include atleast one memory 930, configured to store a program instruction and/ordata. The memory 930 is coupled to the processor 920. The coupling inthis embodiment of this application is an indirect coupling or acommunication connection between apparatuses, units, or modules, may bein an electrical form, a mechanical form, or another form, and is usedfor information exchange between the apparatuses, the units, and themodules. The processor 920 may operate with the memory 930. Theprocessor 920 may execute the program instruction stored in the memory930. When executing the program instruction in the memory 930, theprocessor 920 may implement the function of the first node in theembodiment shown in FIG. 4. At least one of the at least one memory maybe included in the processor.

The forwarding entry monitoring apparatus 900 may further include acommunications interface 910, configured to communicate with anotherdevice through a transmission medium, so that an apparatus in the devicemonitoring apparatus 900 may communicate with the another device. Forexample, the another device may be a terminal device. The processor 920may receive and send data through the communications interface 910, andmay implement the method performed by the first node in the embodimentcorresponding to FIG. 4.

In this embodiment of this application, a specific connection mediumbetween the communications interface 910, the processor 920, and thememory 930 is not limited. In this embodiment of this application, thememory 930, the processor 920, and the communications interface 910 areconnected through a bus 940 in FIG. 9, and the bus is represented by athick line in FIG. 9. A connection manner between other components isschematically described, and is not limited thereto. The bus may beclassified into an address bus, a data bus, a control bus, and the like.For ease of representation, only one thick line is used to represent thebus in FIG. 9, but this does not mean that there is only one bus or onlyone type of bus.

In this embodiment of this application, the processor 920 may be ageneral-purpose processor, a digital signal processor, anapplication-specific integrated circuit, a field programmable gate arrayor another programmable logic device, a discrete gate or a transistorlogic device, or a discrete hardware component, and can implement orperform the methods, operations, and logical block diagrams disclosed inthe embodiments of this application. The general-purpose processor maybe a microprocessor or any conventional processor or the like. Theoperations of the method disclosed with reference to the embodiments ofthis application may be directly performed by a hardware processor, ormay be performed by a combination of hardware and software modules inthe processor.

In this embodiment of this application, the memory 930 may be anon-volatile memory such as a hard disk drive (HDD) or a solid-statedrive (SSD), or may be a volatile memory such as a random access memory(RAM). The memory is any other medium that can be configured to carry orstore expected program code in a form of an instruction or a datastructure and that can be accessed by a computer. However, the memory isnot limited thereto. The memory in this embodiment of this applicationmay alternatively be a circuit or any other apparatus that can implementa storage function, and is configured to store the program instructionand/or the data.

FIG. 10 shows a forwarding entry monitoring apparatus 1000 according toan embodiment of this application. The forwarding entry monitoringapparatus 1000 may be a second node, and can implement a function of thesecond node in the method provided in the embodiments of thisapplication. Alternatively, the forwarding entry monitoring apparatus1000 may be an apparatus that can support the second node inimplementing the function of the second node in the method provided inthe embodiments of this application. The forwarding entry monitoringapparatus 1000 may be a chip system. In this embodiment of thisapplication, the chip system may include a chip, or may include a chipand another discrete component.

The forwarding entry monitoring apparatus 1000 includes at least oneprocessor 1020, configured to implement or support the apparatus inimplementing the function of the second node in the method provided inthe embodiments of this application. For example, the processor 1020 maydetermine a monitored data stream, a first node, and a transmission pathof the data stream. For example, the processor 1020 is configured todetermine the monitored data stream based on a first instruction,determine the first node based on a forwarding entry, and determine thetransmission path of the data stream based on a first packet fed back bythe first node and/or a third packet fed back by a third node. Fordetails, refer to detailed descriptions in the method example. Detailsare not described herein again.

The forwarding entry monitoring apparatus 1000 may further include atleast one memory 1030, configured to store a program instruction and/ordata. The memory 1030 is coupled to the processor 1020. The coupling inthis embodiment of this application is an indirect coupling or acommunication connection between apparatuses, units, or modules, may bein an electrical form, a mechanical form, or another form, and is usedfor information exchange between the apparatuses, the units, and themodules. The processor 1020 may operate with the memory 1030. Theprocessor 1020 may execute the program instruction stored in the memory1030. When executing the program instruction in the memory 1030, theprocessor 1020 may implement the function of the second node in theembodiment shown in FIG. 4. At least one of the at least one memory maybe included in the processor.

The forwarding entry monitoring apparatus 1000 may further include acommunications interface 1010, configured to communicate with anotherdevice through a transmission medium, so that an apparatus in the devicemonitoring apparatus 1000 may communicate with the another device. Forexample, the another device may be a terminal device. The processor 1020may receive and send data through the communications interface 1010, andmay implement the method performed by the second node in the embodimentcorresponding to 4.

In this embodiment of this application, a specific connection mediumbetween the communications interface 1010, the processor 1020, and thememory 1030 is not limited. In this embodiment of this application, thememory 1030, the processor 1020, and the communications interface 1010are connected through a bus 1040 in FIG. 10, and the bus is representedby a thick line in FIG. 10. A connection manner between other componentsis schematically described, and is not limited thereto. The bus may beclassified into an address bus, a data bus, a control bus, and the like.For ease of representation, only one thick line is used to represent thebus in FIG. 10, but this does not mean that there is only one bus oronly one type of bus.

In this embodiment of this application, the processor 1020 may be ageneral-purpose processor, a digital signal processor, anapplication-specific integrated circuit, a field programmable gate arrayor another programmable logic device, a discrete gate or a transistorlogic device, or a discrete hardware component, and can implement orperform the methods, operations, and logical block diagrams disclosed inthe embodiments of this application. The general-purpose processor maybe a microprocessor or any conventional processor or the like. Theoperations of the method disclosed with reference to the embodiments ofthis application may be directly performed by a hardware processor, ormay be performed by a combination of hardware and software modules inthe processor.

In this embodiment of this application, the memory 1030 may be anon-volatile memory such as a hard disk drive (HDD) or a solid-statedrive (SSD), or may be a volatile memory such as a random access memory(RAM). The memory is any other medium that can be configured to carry orstore expected program code in a form of an instruction or a datastructure and that can be accessed by a computer. However, the memory isnot limited thereto. The memory in this embodiment of this applicationmay alternatively be a circuit or any other apparatus that can implementa storage function, and is configured to store the program instructionand/or the data.

An embodiment of this application further provides a computer-readablestorage medium, including an instruction. When the instruction is run ona computer, the computer is enabled to perform the method performed bythe first node in FIG. 4.

An embodiment of this application further provides a computer-readablestorage medium, including an instruction. When the instruction is run ona computer, the computer is enabled to perform the method performed bythe second node in FIG. 4.

An embodiment of this application provides a chip system. The chipsystem includes a processor, may further include a memory, and isconfigured to implement a function of the first node in the foregoingmethods. The chip system may include a chip, or may include a chip andanother discrete component.

An embodiment of this application provides a chip system. The chipsystem includes a processor, may further include a memory, and isconfigured to implement a function of the second node in the foregoingmethods. The chip system may include a chip, or may include a chip andanother discrete component.

An embodiment of this application provides a system. The system includesthe first node and the second node described above.

All or some of the foregoing methods in the embodiments of thisapplication may be implemented through software, hardware, firmware, orany combination thereof. When the software is used to implement theembodiments, all or some of the embodiments may be implemented in a formof a computer program product. The computer program product includes oneor more computer instructions. When the computer instructions are loadedand executed on a computer, the procedure or functions according to theembodiments of the present application are all or partially generated.The computer may be a general-purpose computer, a dedicated computer, acomputer network, a network device, a user device, or anotherprogrammable apparatus. The computer instructions may be stored in acomputer-readable storage medium or may be transmitted from acomputer-readable storage medium to another computer-readable storagemedium. For example, the computer instructions may be transmitted from awebsite, computer, server, or data center to another website, computer,server, or data center in a wired (for example, a coaxial cable, anoptical fiber, or a digital subscriber line (DSL)) or wireless (forexample, infrared, radio, or microwave) manner. The computer-readablestorage medium may be any usable medium accessible by a computer, or adata storage device, such as a server or a data center, integrating oneor more usable media. The usable medium may be a magnetic medium (forexample, a floppy disk, a hard disk, or a magnetic tape), an opticalmedium (for example, a digital video disc (DVD), a semiconductor medium(for example, an SSD), or the like.

A person skilled in the art can make various modifications andvariations to this application without departing from the scope of thisapplication. This application is intended to cover these modificationsand variations of this application provided that they fall within thescope of protection defined by the following claims and their equivalenttechnologies.

What is claimed is:
 1. A forwarding entry monitoring method, comprising:determining, by a first node, a data stream to be monitored;determining, by the first node, that a stored forwarding entry changes,wherein the forwarding entry is used to forward the data stream; andsending, by the first node, a first packet to a second node located on atransmission path of the data stream, wherein the second node is aprevious-hop node of the first node, and the first packet carries achange indication.
 2. The method according to claim 1, wherein thechange indication is used to indicate that the forwarding entry changes,or the change indication is used to indicate changed content in theforwarding entry.
 3. The method according to claim 1, wherein the firstpacket further carries a node identifier of the first node and a nodeidentifier of the second node.
 4. The method according to claim 1,wherein sending a first packet to a second node comprises: sending, bythe first node, the first packet to the second node through a firstchannel that is different from the transmission path of the data stream.5. The method according to claim 1, wherein determining a data stream tobe monitored comprises: receiving, by the first node, a second packetfrom the second node through the transmission path of the data stream,wherein the second packet is used to obtain status information of theforwarding entry, and the status information is used to indicate whetherthe forwarding entry changes; and determining, by the first node, thedata stream based on a parameter carried in the second packet.
 6. Themethod according to claim 5, wherein the parameter carried in the secondpacket comprises an identifier of the transmission path of the datastream.
 7. The method according to claim 1, wherein after the sending,by the first node, a first packet to a second node, the method furthercomprises: sending, by the first node, the second packet to a third nodethrough the transmission path of the data stream, wherein the third nodeis a next-hop node of the first node on the transmission path of thedata stream.
 8. The method according to claim 7, wherein the first node,the second node, and the third node are nodes located in an autonomicnetworking integrated model and approach (ANIMA) domain.
 9. A forwardingentry monitoring method, comprising: receiving, by a second node, afirst instruction to instruct the second node to monitor whether aforwarding entry on a transmission path of a data stream changes,wherein the forwarding entry is used to forward the data stream, and thefirst instruction carries an identifier of the transmission path of thedata stream; determining, by the second node, a first node based on aforwarding entry stored on the second node, wherein the first node is anext-hop node of the second node on the transmission path; and sending,by the second node, a second packet to the first node to obtain statusinformation of a first forwarding entry stored on the first node,wherein the status information is used to indicate whether the firstforwarding entry changes, and the first forwarding entry is used by thefirst node to forward the data stream.
 10. The method according to claim9, further comprising: receiving, by the second node, at least one of afirst packet generated by the first node or a third packet generated bya third node, wherein the first packet carries a first change indicationused to indicate that the first forwarding entry changes, the thirdpacket is used to carry a second change indication used to indicate thata second forwarding entry stored on the third node changes, the secondforwarding entry is used by the third node to forward the data stream,and the third node is a next-hop node of the first node on thetransmission path.
 11. The method according to claim 10, furthercomprising: determining, by the second node based on at least one of thefirst packet or the third packet, a transmission path used to forwardthe data stream, wherein the first packet further carries a nodeidentifier of the second node and a node identifier of the first node,and the third packet further carries the node identifier of the firstnode and a node identifier of the third node.
 12. The method accordingto claim 10, further comprising at least one of: determining, by thesecond node based on the first change indication, that a change of thefirst forwarding entry meets a preset condition, and outputting, by thesecond node based on the first packet, prompt information to remind thechange, wherein the preset condition comprises a condition under whichtransmission of the data stream is interrupted; or determining, by thesecond node based on the second change indication, that a change of thesecond forwarding entry meets a preset condition, and outputting, by thesecond node based on the third packet, prompt information to remind thechange, wherein the preset condition comprises the condition under whichtransmission of the data stream is interrupted.
 13. A forwarding entrymonitoring apparatus, comprising: a processor; and a memory storinginstructions, which when executed by the processor, cause the processorto determine a to-be-monitored data stream, and determine that aforwarding entry stored in the storage unit changes, wherein theforwarding entry is used to forward the data stream; and send a firstpacket to a second node, wherein the second node is located on atransmission path of the data stream, the second node is a previous-hopnode of the first node, and the first packet carries a changeindication.
 14. The apparatus according to claim 13, wherein the changeindication is used to indicate that the forwarding entry changes. 15.The apparatus according to claim 13, wherein the change indication isused to indicate changed content in the forwarding entry.
 16. Theapparatus according to claim 13, wherein the first packet furthercarries a node identifier of the apparatus and a node identifier of thesecond node.
 17. The apparatus according to claim 13, wherein theinstructions further cause the processor to: send the first packet tothe second node through a first channel, wherein the first channel isdifferent from the transmission path of the data stream.
 18. Theapparatus according to claim 13, wherein the instructions further causethe processor to: receive a second packet from the second node throughthe transmission path of the data stream, wherein the second packet isused to obtain status information of the forwarding entry, and thestatus information is used to indicate whether the forwarding entrychanges; and determine the data stream based on a parameter carried inthe second packet.
 19. The apparatus according to claim 17, wherein theparameter carried in the second packet comprises an identifier of thetransmission path of the to-be-monitored data stream.
 20. The apparatusaccording to claim 13, wherein the instructions further cause theprocessor to: send the second packet to a third node, wherein the thirdnode is a next-hop node of the apparatus on the transmission path of thedata stream.